package md.mru.core.repositories;

import md.mru.core.domains.administration.TreeNodeType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author sergiu.marin
 * @since 01.04.2014
 */
public interface FunctionRepository extends JpaRepository<TreeNodeType, Long> {

    @Query("SELECT fc FROM TreeNodeType fc order by fc.functionCategory.id, fc.id")
    public List<TreeNodeType> getFunctions();

}
